(current-language-environment): Set type according to
authorMarkus Rost <rost@math.uni-bielefeld.de>
Fri, 13 Dec 2002 22:41:40 +0000 (22:41 +0000)
committerMarkus Rost <rost@math.uni-bielefeld.de>
Fri, 13 Dec 2002 22:41:40 +0000 (22:41 +0000)
`language-info-alist' also here.

lisp/international/mule-cmds.el

index 508be261b1d8453799dcb03d402f73f66aadf90b..2ee7c484bea7d4265de5df8ff97c90777d43a67e 100644 (file)
@@ -1505,8 +1505,14 @@ to using the function `set-language-environment'."
                          current-language-environment)
                        language-info-alist))
             "English"))
-  ;; a better custom type will be set with `set-language-info'.
-  :type 'string
+  ;; custom type will be updated with `set-language-info'.
+  :type (if language-info-alist
+           (cons 'choice (mapcar
+                          (lambda (lang)
+                            (list 'const (car lang)))
+                          (sort (copy-sequence language-info-alist)
+                                (lambda (x y) (string< (car x) (car y))))))
+         'string)
   :initialize 'custom-initialize-default
   :group 'mule)